<!DOCTYPE html>
<html>
<head>
    <title>{{ question.question_text }}</title>
    <style>
        .choices-form { max-width: 500px; }
        .choice-item { margin: 1rem 0; }
        .error { color: #dc3545; }
        button {
            padding: 0.5rem 1rem;
            background: #007bff;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <h1>{{ question.question_text }}</h1>
    {% if error_message %}<p class="error">{{ error_message }}</p>{% endif %}
    
    <form action="{% url 'polls:vote' question.id %}" method="post" class="choices-form">
        {% csrf_token %}
        {% for choice in question.choices.all %}
            <div class="choice-item">
                <input 
                    type="radio" 
                    name="choice" 
                    id="choice{{ forloop.counter }}" 
                    value="{{ choice.id }}"
                >
                <label for="choice{{ forloop.counter }}">
                    {{ choice.choice_text }}
                </label>
            </div>
        {% endfor %}
        <button type="submit">ͶƱ</button>
    </form>
</body>
</html>